<template>
  <view class="xnotice" v-if="xDialogCoinsShow">
    <view class="xnoticeMask"></view>
    <view class="qtWrongNotice" :style="'background:'+bgColor+';'" @click="hideDialog()">
      <view style="text-align: right;padding-right:40rpx;">
        <uni-icons type="close" size="30" color="#FFFFFF"></uni-icons>
      </view>
      <view>
        <view
            style="position: absolute;top: 250rpx; z-index:10;text-align: center;width:100%;font-weight: bold;color: #ffb421">
          <view>恭喜获得</view>
          <view>{{coins}}金币</view>
        </view>
        <view style="position: absolute;top:20rpx;width:100%;">
          <image src="~@/static/app_image/img_jinbitanchuang.png" style="width:90%;margin-left: 5%;"></image>
        </view>
      </view>
      <view style="position: absolute;top:500rpx;width:100%;"></view>
    </view>
  </view>
</template>
<script>
export default {
  name: "xToastCoins",
  data() {
    return {
      xDialogCoinsShow: false,
      bgColor: ''
    }
  },
  watch: {
    isShow: {
      handler(newValue, oldValue) {
        var t = this;
        t.initDialog(newValue);
      }
    }
  },
  mounted: function () {
    var t = this;
    t.initDialog(t.isShow);
  },

  methods: {
    initDialog(showValue) {
      var t = this;
      t.xDialogCoinsShow = showValue;
    },
    hideDialog() {
      var t = this;
      t.xDialogCoinsShow = false;
      // t.changecoinsDialogShow();
      t.$emit('hideDialog')
    }
  },
  props: ['isShow','coins'],
};
</script>
<style>


</style>
